home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / comm / pirch32.zip / ALIASES.PAF next >
Text File  |  1996-07-22  |  6KB  |  16 lines

  1. ACTION:/me *1
  2. CF11:/set ctcp on
  3. F11:/set ctcp off |/flush
  4. GONE:/awin /me is away... \-2 brb \-2 |/away I am away from my computer
  5. HUG:(((((((((( $+ $$1 $+ ))))))))))
  6. J:/join $# $1
  7. LEAVE:/part #
  8. OPS:/opnotice # *1
  9. SND:/sound # *1
  10. [COUNT]:{ SAMPLE PIL SCRIPT [COUNT] |Usage /runscript [COUNT]|Counts the people in the channel, seperating ops and |undernet bots }|ops := 0;|bots := 0;|usercount := strtoint($members);|for i := 1 to usercount do|begin|    $s := nicklist($audience,i);|    if $s = 'X' then |        bots := bots + 1;|    if $s = 'W' then |        bots := bots + 1;|    if isop($audience,$s) then|        ops := ops + 1;|end;|if bots = 1 then|    $s2 := ' is a service bot';|if bots <> 1 then |    $s2 := ' are service bots';|ops := ops - bots;|if usercount > 0 then|    percentage := ops * 100 / usercount|else |    percentage := 0;|command('/msg ',$audience,' There are ',$members, ' members of ',$audience,' (',ops,' are ops and ',bots,$s2,')  ',|    percentage,'% of ',$audience,' is occupied by ops');
  11. [HANGMAN]:{-Usage /runscript [HANGMAN] <Game word or phrase> |-Required event: ON TEXT:!hangman*:#:/runscript [hangplay] # $nick *2|-Required event: ON TEXT:!solve*:#:/runscript [hangsolve] # $nick *2|-This is a IRC HANGMAN game written to demonstrate PIL scripting. |-This is a multi-script game....|-[HANGMAN] (this script) starts a new game|-[HANGPLAY] Processes the user guess at a letter|-HANGMAN in case you dont remember is a word game in which one person|-(the controller of the game ie YOU) makes up a word and allows others|-to guess letters. If the letter is in the word, the letter is filled in, if the letter is|-not in the word, part of hangman is drawn... play continues until the word/phrase|- is guessed or all of hangman is drawn (in which case he is hung)|-(our hangman only has 4 parts)|}|$hmword := *1;|$hmword := strlower($hmword);|command('/define hangword=',$hmword);|$hmsolved := '';|for i := 1 to strlen($hmword) do|begin|    if strcopy($hmword,i,1) <> ' ' then|        $hmsolved := $hmsolved + '-'|    else|        $hmsolved := $hmsolved + ' ';|end;|command('/define hangsolved=',$hmsolved);|command('/define hangmissed=',0);|command('/msg ',$audience,' ',\3,' Hangman Game has started: type !hangman <letter> to make a guess ',\3);|command('/msg ',$audience,' ',\3,' Hangman: ',$hmsolved,\3);
  12. [HANGPLAY]:{-SAMPLE PIL SCRIPT: (HANGPLAY]|-This is the game play script that processes a user's letter guess|-Required event: ON TEXT:!hangman*:#hangman:/runscript [hangplay] # $nick *2|}|$hangman := 'o>--<';|$word := strupper($hangword);|if $word = '' then|    halt;|$solved := $hangsolved;|$chan := $1;|$nick := $2;|$answer := strupper(*3);|if $answer = '' then Halt;|$c := strupper(strcopy($answer,1,1));|gameover := false;|misses := strtoint($hangmissed);|continue := true;|found := false;|{ is user guessing a word or a letter? }|if strlen($answer) > 1 then|begin|    if $answer = $word then|    begin|        $solved := $answer;|        command('/msg ',$chan,' ',\3,'Hangman: ',$solved, ' by ',$nick,\3);|        command('/msg ',$chan,' ',\2,'Hangman: ',' (GAME OVER) - Hangman lives!',\2);|        GameOver := true;|    end|    else|    begin|        misses := misses + 1;|        command('/define hangmissed=',misses);|        command('/msg ',$chan,' ',\5,'Wrong solution ',$nick,'     ',strcopy($hangman,1,misses),\5);|        command('/msg ',$chan,' ',\3,'Hangman: ',$solved,\3);|        if misses = strlen($hangman) then|        begin|            command('/msg ',$chan,' ',\2,'Hangman: ',$word, ' (GAME OVER) - Hangman is dead!',\2);|            gameover := true;|        end;|    end;|end|else|begin|    for i := 1 to strlen($solved) do|    begin|        if strcopy($solved,i,1) = strupper($c) then|        begin|            continue := false;|        end;|    end;|    if continue then|    begin|        for i := 1 to strlen($word) do|        begin|            if $c = strcopy($word,i,1) then|            begin|                found := true;|                strdel($solved,i,1);|                strins($c,$solved,i);|            end;|        end;|        if found then|        begin|            command('/define hangsolved=',$solved);|            command('/msg ',$chan,' ',\3,$nick,' has matched the letter:',\2,$c,\2,'     ',strcopy($hangman,1,misses),\3);|            command('/msg ',$chan,' ',\3,'Hangman: ',$solved,\3);|            if strpos('-',$solved) = 0 then|            begin|                command('/msg ',$chan,' ',\2,'Hangman: ',$solved, ' (GAME OVER) - Hangman lives!',\2);|                GameOver := true;|            end;|        end|        else|        begin|            misses := misses + 1;|            command('/define hangmissed=',misses);|            command('/msg ',$chan,' ',\3,'No match for the letter:',\2,$c,\2,'     ',strcopy($hangman,1,misses),\3);|            command('/msg ',$chan,' ',\3,'Hangman: ',$solved,\3);|            if misses = strlen($hangman) then|            begin|                command('/msg ',$chan,' ',\2,' Hangman: ',$word, ' (GAME OVER) - Hangman is dead!',\2);|                gameover := true;|            end;|        end;|    end;|end;|if GameOver then|begin|    command('/undefine hangsolved');|    command('/undefine hangword');|    command('/undefine hangmissed');|end;
  13. [MASSGREET]:{----------------------------------------------------------------------------------------------------------|*** Script: MASSGREET|*** Date: 7/9/96|----------------------------------------------------------------------------------------------------------}|$s := '';|opsonly := true;|k := strtoint($members);|for i := 1 to k do|begin|    $thisnick :=  nicklist($audience,i); |    if strlen($s+$thisnick) > 255 then|    begin|        command('/msg ',$audience,' hi ',$s);|        $s := '';|    end;|    if ($thisnick <> $me) and ($thisnick <> 'X') and ($thisnick <> 'W') then|    begin|        if strlen($s) > 0 then|            $s := $s + ', ';|        $s := $s + $thisnick;        |    end;|end;|if strlen($s) > 0 then|begin|    command('/msg ',$audience,' hi ',$s);|end;
  14. [PIGLATIN]:{ usage: /runscript [piglatin] <text message> }|{ probably will want to make an alias like|- piglatin:/runscript [piglatin] *1 |}|$target := '';|$source := *1 ;|while strlen($source) > 0 do|begin|    $word := strtoken($source);|    $c := strcopy($word,1,1);|    if strpos(strupper($c),'AEIOU') = 0 then|    begin|        strdel($word,1,1);|        $word := $word+$c+'a';|    end;|    $target := $target + $word+' ';|end;|command('/msg ',$audience,' pirch latin: ',$target);
  15. [ROLL]:{ Rolls a pair of dice...|  Required event: ON TEXT:!roll:#yourchannel:/runscript [roll] # $nick }|$chan := $1;|$nick := $2;|die1 := random(5)+1;|die2 := random(5)+1;|command('/msg ',$chan,' ',$nick,' has rolled a ',\3,die1,\3,' and a ',\3,die2,\3,'   [',\2,die1+die2,\2,']');
  16.